package lcy.homework03.second;

/**
 * @ClassName: OrderStatusTest
 * @Description: 测试类 OrderStatusTest
 * @author: 李春洋
 * @date: 2024/4/18 16:12
 * @Blog: https://
 */
public class OrderStatusTest {
    public static void main(String[] args) {
        // 验证枚举常量的属性和方法
        System.out.println("订单状态名称:");
        for (OrderStatus status : OrderStatus.values()) {
            System.out.println(status + ": " + status.getStatusName());
        }

        // 验证枚举常量的比较
        OrderStatus status1 = OrderStatus.PENDING;
        OrderStatus status2 = OrderStatus.PENDING;
        OrderStatus status3 = OrderStatus.COMPLETED;

        System.out.println("比较状态:");
        System.out.println(status1 + " 等于 " + status2 + ": " + (status1 == status2));
        System.out.println(status1 + " 等于 " + status3 + ": " + (status1 == status3));
    }
}
